<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
</head>
<body>
<!--enctype="multipart/form-data" 将POST的文件拆分成数据包进行上传-->
<form action="{% url 'DjangoModel:upload_file' %}" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <span>文件：</span>
    <input type="file" name="icon">
    <br>
    <input type="submit" value="上传">
</form>

</body>
</html>